home *** CD-ROM | disk | FTP | other *** search
- /*
- File: StorageClassDriver.h
-
- Contains: All structures and definitions used by all components of
- the Storage Class Driver
-
- Version: 1.3
-
- Copyright: © 1998-1999 by Apple Computer, Inc., all rights reserved.
- */
-
-
- #ifndef __STORAGECLASSDRIVERH__
- #define __STORAGECLASSDRIVERH__
-
- #include <USB.h>
- #include "StorageClassPublicAPI.h"
- #include "StorageDeviceConfiguration.h"
-
- #define kStorageRetryCount 5
- #define kUSBMaxBulkTransfer 0x200000 // Max transfer is 2MB
-
- #define kDeviceVendorID kDriverVendorID // USB Vendor ID
- #define kDeviceProductID kDriverProductID // USB Product ID.
- #define kDeviceClass kDriverClassID
- #define kDeviceSubClass kDriverSubclassID
-
- //
- // These functions are found in StorageClassDriver.c
- //
- extern void StorageDriverEntry( USBDeviceRef deviceRef, USBDeviceDescriptorPtr deviceDescriptorPtr, USBInterfaceDescriptorPtr pInterfaceDescriptor );
- extern void StorageClassDriverFinalize( void );
- extern OSStatus StorageClassDriverNotifyProc(UInt32 notification, void* pointer, UInt32 refcon);
- extern Boolean IsThisASupportedProtocol( UInt8 theProtocol );
-
- // These are the prototypes for utility functions -- should propably be in a seperate module
- extern void InitParamBlock(USBDeviceRef theDeviceRef, USBPB* paramblock);
- extern OSStatus ClearFeatureEndpointStall( USBPB *usbPB, USBPipeRef pipeRefForEndpoint, USBCompletion completionProc, UInt32 refCon);
- extern OSStatus GetStatusEndpointStatus( USBPB *usbPB, USBPipeRef pipeRefForEndpoint, USBCompletion completionProc, Ptr Buffer, UInt32 refCon);
-
- // Accessors for USB references
- extern UInt8 GetInterfaceSubclass( void );
- extern UInt32 GetInterfaceNumber( void );
- extern USBDeviceRef GetInterfaceRef( void );
- extern USBPipeRef GetBulkInPipeRef( void );
- extern USBPipeRef GetBulkOutPipeRef( void );
- extern USBPipeRef GetInterruptPipeRef( void );
-
-
- #endif //__STORAGECLASSDRIVERH__